package com.samuel.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author kaiji
 * @since 2021-04-02 14:32:04
 */
@RestController
@RequestMapping("consumer")
public class OrderController {
    private static final String URL = "http://cloud-provider-payment/";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("payment")
    public String payment() {
        return restTemplate.getForObject(URL + "payment/info", String.class);
    }
}
